package com.spring.service;

import com.spring.mapper.StudentMapper;
import com.spring.pojo.Student;
import com.spring.pojo.StudentExample;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StudentServiceImpl implements StudentService {
    @Autowired
    private StudentMapper mapper;

    @Override
    public long countByExample(StudentExample example) {
        return mapper.countByExample(example);
    }

    @Override
    public int deleteByExample(StudentExample example) {
        return mapper.deleteByExample(example);
    }

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return mapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(Student record) {
        return mapper.insert(record);
    }

    @Override
    public int insertSelective(Student record) {
        return mapper.insertSelective(record);
    }

    @Override
    public List<Student> selectByExample(StudentExample example) {
        return mapper.selectByExample(example);
    }

    @Override
    public Student selectByPrimaryKey(Integer id) {
        return mapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByExampleSelective(Student record, StudentExample example) {
        return mapper.updateByExampleSelective(record, example);
    }

    @Override
    public int updateByExample(Student record, StudentExample example) {
        return mapper.updateByExample(record, example);
    }

    @Override
    public int updateByPrimaryKeySelective(Student record) {
        return mapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(Student record) {
        return mapper.updateByPrimaryKey(record);
    }
}